Skip to content

Conversation

@Jayaram007
Copy link
Contributor

This PR addresses minor typos and resolves code indentation issues for cleaner, more maintainable code.

Copilot AI review requested due to automatic review settings January 6, 2026 14:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request performs a major restructuring of the repository, reorganizing the codebase into versioned implementations (version_1 and version_2) while removing the previous frontend and core directories. The PR focuses on Snowflake-based deployment configurations and documentation.

Key changes:

  • Complete removal of the Node.js/React frontend and Python backend core
  • Addition of version_1 with basic Snowflake Streamlit implementation
  • Addition of version_2 with advanced Snowflake Native App configuration
  • Updated README to reflect the new Snowflake-focused architecture
  • Modified CI workflow to reflect new directory structure

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
version_2/snowflake.yml Snowflake Native App configuration with duplicate definition_version key
version_2/setup.sql Database setup script with stage grant bug (DOC_SCHEMA typo)
version_2/readme.md Comprehensive deployment guide with file count inconsistencies
version_2/manifest.yml App metadata and configuration
version_2/environment.yml Conda environment specification
version_1/setup.sql Basic Snowflake infrastructure setup
version_1/readme.md Beginner-friendly guide
version_1/app.py Streamlit application with AI chatbot functionality
README.md Updated main documentation for Snowflake architecture
.github/workflows/CI.yml Updated CI to format version_1 and version_2 directories
src/* All previous source files deleted (frontend, core, entrypoint)
Comments suppressed due to low confidence (7)

version_2/readme.md:403

  • Spelling error: "recieve" should be "receive".
- **Emergency Support**: Email info@aifaq.pro ( might take 1 to 2 days for reply)

version_2/readme.md:462

  • The heading is missing a leading hash symbol. It should be "## Quick Start Summary" to maintain consistent heading levels with the rest of the document.
##  Quick Start Summary

version_2/readme.md:18

  • The file path formatting is inconsistent between line 9 (showing 5 files) and line 12-17 (showing 7 files in the tree). The comment on line 9 mentions "5 essential files" but the tree structure lists 6 files. This discrepancy should be corrected.
Your deployment package contains 5 essential files:

aifaq-pro-app/version_2/
├── app_version2.py # Main Streamlit application (our provided code)
├── manifest.yml # App configuration & metadata
├── setup.sql # Database objects & schema setup
├── environment.yml # Python environment & dependencies
└── snowflake.yml # SnowCLI deployment configuration

version_2/readme.md:102

  • The comment mentions "7 files" but there are only 5 distinct files referenced in the PUT commands (aifaq_app.py, manifest.yml, setup.sql, environment.yml, snowflake.yml). The LICENSE and requirements.txt files mentioned in line 100-101 don't match the files listed in the File Structure Overview.
3. Upload all 7 files using the **+ Files** button

Or use SQL:
```sql
-- Stage each file
PUT file:///path/to/aifaq_app.py @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/manifest.yml @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/setup.sql @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/environment.yml @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/snowflake.yml @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/requirements.txt @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/LICENSE @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
**version_2/readme.md:139**
* References to "7 files" are inconsistent with the actual file structure. Line 139 mentions "Drag-and-drop all 7 files" but the documentation only shows 5-6 core files in the File Structure section.
  1. Drag-and-drop all 7 files
**version_1/app.py:3**
* Import of 're' is not used.

import uuid, re, datetime as dt

**version_1/app.py:5**
* Import of 'io' is not used.

import io

</details>



---

💡 <a href="/hyperledger-labs/aifaq/new/main/.github/instructions?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.

f"SELECT DOC_ID, FILENAME, FILE_TYPE, FILE_SIZE, UPLOADED_AT FROM {DOCS_TBL} ORDER BY UPLOADED_AT DESC"
).to_pandas()
return session.sql(f"SELECT DOC_ID, FILENAME, FILE_TYPE, FILE_SIZE, UPLOADED_AT FROM {DOCS_TBL} ORDER BY UPLOADED_AT DESC").to_pandas()
except:
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except block directly handles BaseException.

Copilot uses AI. Check for mistakes.
messages.append({"role": "user", "content": r["QUERY_TEXT"]})
messages.append({"role": "assistant", "content": r["RESPONSE_TEXT"]})
return messages
except:
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except block directly handles BaseException.

Copilot uses AI. Check for mistakes.
Comment on lines 710 to 812
except Exception:
pass
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'except' clause does nothing but pass and there is no explanatory comment.

Suggested change
except Exception:
pass
except Exception as e:
st.error(f"Error loading chat sessions: {e}")

Copilot uses AI. Check for mistakes.
@Jayaram007 Jayaram007 force-pushed the snowflake branch 2 times, most recently from 023d6bf to 07faff4 Compare January 20, 2026 15:49
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram <96161233+Jayaram007@users.noreply.github.com>
@Jayaram007 Jayaram007 closed this Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant